﻿namespace Creek.UI.EFML.Base.JS.ScriptingTypes
{
    using System.Web.Script.Serialization;

    public class JSON
    {
        #region Public Methods and Operators

        public static object parse(string s)
        {
            return new JavaScriptSerializer().DeserializeObject(s);
        }

        public static string stringify(object o)
        {
            var ser = new JavaScriptSerializer(new SimpleTypeResolver());
            return ser.Serialize(o);
        }

        #endregion
    }
}